package com.cwd.arm.infrastructure.dao.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.cwd.arm.infrastructure.dao.ProjectReceiveDirectorDao;
import com.cwd.arm.infrastructure.dao.base.DaoImpl;
import com.cwd.arm.infrastructure.mapper.ProjectReceiveDirectorMapper;
import com.cwd.arm.infrastructure.po.ProjectReceiveDirectorPo;
import org.springframework.stereotype.Service;

import java.util.List;

/**
* Description:项目收款负责人
* Created on 2022年01月15日
* @author  yan
*/
@Service
public class ProjectReceiveDirectorDaoImpl extends DaoImpl<ProjectReceiveDirectorMapper, ProjectReceiveDirectorPo> implements ProjectReceiveDirectorDao {

    @Override
    public void delByProjectId(Long projectId) {
        QueryWrapper<ProjectReceiveDirectorPo> queryWrapper = new QueryWrapper<>();
        queryWrapper.eq("project_id",projectId);
        baseMapper.delete(queryWrapper);
    }

    @Override
    public List<ProjectReceiveDirectorPo> selectListByProjectId(Long projectId) {
        return baseMapper.selectListByProjectId(projectId);
    }
}
